Getting Started

In this tutorial, we will show you how to use and setup TriggerKit!

1. Download TriggerKit

You can either install latest from the GitHub repository:

$ pip install git+https://github.com/Datatistics/triggerkit.git

or from [pypi][pypi]

$ pip install triggerkit

2. Setup Database Connection

Important

Right now, TriggerKit only suports connections to Snowflake, but we may add support for other databases downt the line.

You can establish TriggerKit’s connection to your Snowflake through your config.toml file:

[snowflake]
user = "your_username"
password = "${SNOWFLAKE_PASSWORD}"  # Use $ or ${} to import enviromental variables
account = "your_account"
warehouse = "your_warehouse"
database = "your_database"
schema = "your_schema"
role = "${SNOWFLAKE_ROLE-ACCOUNTADMIN}" # You can also set defaults using a "-" i.e. ${ENVIRON-defualt_value}

If you would like TriggerKit to automatically import all of the views in a schema on startup, you can specify check_schema. To have it recheck this schema periodically, you can also specify schema_check_freq and triggerkit will create a job for itself to import any new views in the schema as views you can create jobs/actions for.


[snowflake]
...
check_schema        = "TK_ACTIONS"              # Name of whatever schema you want to use
schema_check_freq   = "every 15 minutes"        # How often you would like TK to recheck the schedma
Note

We recommend setting up since it makes configuring TriggerKikt easier. For the rest of this tutorial, we will assume that you’ve taken advatage of this feature, but you can also configure the views isued bellow as shown in the example_config file

3. Create Your First Trigger and Action

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sagittis posuere ligula sit amet lacinia. Duis dignissim pellentesque magna, rhoncus congue sapien finibus mollis. Ut eu sem laoreet, vehicula ipsum in, convallis erat. Vestibulum magna sem, blandit pulvinar augue sit amet, auctor malesuada sapien. Nullam faucibus leo eget eros hendrerit, non laoreet ipsum lacinia. Curabitur cursus diam elit, non tempus ante volutpat a. Quisque hendrerit blandit purus non fringilla. Integer sit amet elit viverra ante dapibus semper. Vestibulum viverra rutrum enim, at luctus enim posuere eu. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.